home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / usr / include / scribus-ng / shortcutwidget.h < prev    next >
Encoding:
C/C++ Source or Header  |  2007-10-10  |  1.2 KB  |  61 lines

  1. /*
  2. For general Scribus (>=1.3.2) copyright and licensing information please refer
  3. to the COPYING file provided with the program. Following this notice may exist
  4. a copyright and/or license notice that predates the release of Scribus 1.3.2
  5. for which a new license (GPL+exception) is in place.
  6. */
  7.  
  8. #ifndef SHORTCUTWIDGET_H
  9. #define SHORTCUTWIDGET_H
  10.  
  11. #include <QWidget>
  12.  
  13. class QEvent;
  14.  
  15. #include "ui_shortcutwidget.h"
  16.  
  17. // class Keys;
  18.  
  19.  
  20. //! \brief User defined key-shortcuts for Style Manager dialog.
  21. class ShortcutWidget : public QWidget, public Ui::ShortcutWidget
  22. {
  23.     Q_OBJECT
  24.  
  25. public:
  26.     ShortcutWidget(QWidget *parent = 0);
  27.     ~ShortcutWidget();
  28.     
  29.     
  30.     virtual void changeEvent(QEvent *e);
  31.  
  32.     bool event( QEvent* ev );
  33.     void keyPressEvent(QKeyEvent *k);
  34.     void keyReleaseEvent(QKeyEvent *k);
  35.     void setShortcut(const QString &shortcut);
  36.     static QString getKeyText(int KeyC);
  37.     void languageChange();
  38.  
  39. public slots:
  40.     void setKeyText();
  41.     void setNoKey();
  42.  
  43. signals:
  44.     /**
  45.      * @brief emitted when a shrotcut is changed.
  46.      *
  47.      * Parameter will be QString::null when No key is used
  48.      */
  49.     void newKey(const QString&);
  50.  
  51. protected:
  52.     int keyCode;
  53.     QString Part0;
  54.     QString Part1;
  55.     QString Part2;
  56.     QString Part3;
  57.     QString Part4;
  58. };
  59.  
  60. #endif
  61.